using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using mvLibrary.Helpers.Utils;

namespace fenk.Sistema
{
    public partial class Logoff : mvLibrary.BaseForm
    {
        public Logoff()
        {
            InitializeComponent();
        }
        public void CallLogoff()
        {
            CallProgram("LOGOFF.NET", 1, 1);
            FillControls(panelData);
        }
        protected override void OnLoad(EventArgs e)
        {
            toolBox.Visible = false;
            CallLogoff();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (mvTextBox2.Text == "")
            {
                MessageBox.Show("Falta indicar linea a desconectar ");
                mvTextBox2.Focus();
            }
            CallLogoff();
            string msg = "";
            if (UniItem.ExtractAsString(3) == "1")
            {
                msg="Usuario desconectado exitosamente ";
            }
            else
            {
                msg="Usuario no conectado ";

            }
            MessageBox.Show(msg,"Resultado", MessageBoxButtons.OK, MessageBoxIcon.Information);
            mvTextBox2.Focus();
        }
    }
}

